package com.qys.livesMall.app.user.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * Created by IntelliJ IDEA.
 * User: dp
 * Date: 2023/04/24
 * Time: 14:58
 * DESCRIPTION: 通用接受参数DTO
 */
@Data
public class AppBaseDTO implements Serializable {
    @Serial
    private static final long serialVersionUID = -1L;

    @Schema(description = "每页显示大小", example = "20")
    private Integer pageSize =10;

    @Schema(description = "页码", example = "1")
    private Integer pageNum =1;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "开始时间", example = "2023-04-24 00:00:00")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Schema(description = "结束时间", example = "2023-04-24 23:59:59")
    @JsonFormat(shape = JsonFormat.Shape.STRING,pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime endTime;

    @Schema(description = "id", example = "123")
    private String id;

    @Schema(description = "name", example = "123")
    private String name;
}
